package com.itsm.example.statemachine.bo;

import com.itsm.example.audit.pojo.state.AuditState;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.Objects;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ItsmState {

    /**
     * value
     */
    private Integer value;

    /**
     * name
     */
    private String name;
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AuditState s = (AuditState) o;
        return Objects.equals(getValue(), s.getValue());
    }
    @Override
    public int hashCode() {
        return Objects.hash(getValue());
    }

}
